package Text.Text001;

public class Computer {
//    电脑属性
    private String brand;
    private String model;
    private String color;

//    用电脑
    public void use(String name){
        System.out.println(name + "正在用" + this.brand + "电脑学习");
    }

//    构造方法
    public Computer() {
    }

    public Computer(String brand, String model, String color) {
        this.brand = brand;
        this.model = model;
        this.color = color;
    }

//    set和get
    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBrand() {
        return brand;
    }

    public String getModel() {
        return model;
    }

    public String getColor() {
        return color;
    }
}
